package main

val aString: String = "Hello"
val fromArrayString: String = String(charArrayOf('H', 'e', 'l', 'l', 'o'))

fun main() {
    println(aString)
    println(fromArrayString)
    //查看代码可以发现==调用的是equal
    println(aString == fromArrayString)
    //比较是否是一个对象需要使用===相当于Java中的==
    println(aString === fromArrayString)

    //字符串模板拼接字符串
    val a: Int = 1
    val b: Int = 2
    println("$a+$b=${a + b}")

    //转义字符的使用
    val sayHello:String="Hello,\"Trump\""
    println(sayHello)

    //转义\$
    val salary:Int=1000
    println("\$salary")

    val rawString:String="""
        \t
        \n
    """.trimIndent()

    println(rawString)
    println(rawString.length)
}